module.exports = app=>{
    const express = require('express');
    let router = express.Router();
    const {
        MessageAddMiddleWare,
        GetMesssageByUserIdMiddleWare,
        GetMessageByMessageIdMiddleWare,
        EditMessageByMessageIdMiddleWare,
        DeleteMessageByMessageIdMiddleWare,
        showAllMessageMiddleWare} = require('../../middleware/message/index');

    router.post('/addmsg',MessageAddMiddleWare);
    router.get('/getmsg/:id',GetMesssageByUserIdMiddleWare );
    router.post('/getmsg',GetMessageByMessageIdMiddleWare);
    router.post('/editmsg',EditMessageByMessageIdMiddleWare);
    router.get('/deletemsg/:id',DeleteMessageByMessageIdMiddleWare);
    router.get('/showallmsg',showAllMessageMiddleWare);
    app.use('/api/web/msg',router);
}